import service from '@/utils/request';

// 获取活动管理列表
export function getActivityList(data) {
  return service({
    url: `/api/system/activity/findActivityPage`,
    method: 'post',
    data,
  });
}

// 活动下架
export function downActivity(id) {
  return service({
    url: `/api/system/activity/setSoldOut?activityId=${id}`,
    method: 'get',
  });
}

// 活动详情
export function getActivityDetail(id) {
  return service({
    url: `/api/system/activity/getDetailById?activityId=${id}`,
    method: 'get',
  });
}

// 成员列表
export function getActivityMember(data) {
  return service({
    url: `/api/system/activity/findActivityUserInfoPage`,
    method: 'post',
    data,
  });
}

// 活动票种下拉列表
export function getActivityTicketTypeList(id) {
  return service({
    url: `/api/system/ticket/ticketList?activityId=${id}`,
    method: 'get',
  });
}

// 活动数据
export function getActivityData(id) {
  return service({
    url: `/api/system/activity/getActivityParticipant?activityId=${id}`,
    method: 'get',
  });
}

// 活动数据日收入
export function getActivityDataDay(id) {
  return service({
    url: `/api/system/activity/getActivityDailyIncome?activityId=${id}`,
    method: 'get',
  });
}

// 活动数据订单详情
export function getActivityDataOrder(id) {
  return service({
    url: `/api/system/appPayOrder/getDetailById?orderNum=${id}`,
    method: 'get',
  });
}

// 活动评价列表
export function getActivityComment(data) {
  return service({
    url: `/api/system/activity/findFeedbackPage`,
    method: 'post',
    data,
  });
}
